package swg.shape;

public class Points
{
	protected int x;
	protected int y;

	public Points(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public Points(String coordinates)
	{
		this.x =Integer.parseInt(coordinates.split(",")[0]);
		this.y = Integer.parseInt(coordinates.split(",")[1]);
	}

	public int getX()
	{
		return x;
	}

	public void setX(int x)
	{
		this.x = x;
	}

	public int getY()
	{
		return y;
	}

	public void setY(int y)
	{
		this.y = y;
	}
	
	public String getCoordinates(){
		return x+","+y+" ";
	}

	@Override
	public String toString()
	{
		return "Points [x=" + x + ", y=" + y + "]";
	}
	
}
